package com.hanxiaozhang.commomentity;

import java.util.Objects;

public class Student implements Cloneable {
	
	private String id;
	private String name;
	private String sex;
	private String phone;
	private String address;

	public Student() {
	}

	public Student(String id, String name, String sex, String phone, String address) {
		this.id=id;
		this.name=name;
		this.sex=sex;
		this.phone=phone;
		this.address=address;
	}

	public Student(String id, String name,String address) {
		this.id=id;
		this.name=name;
		this.address=address;
	}


	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getSex() {
		return sex;
	}

	public void setSex(String sex) {
		this.sex = sex;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	@Override
	public String toString() {
		return "Student [id=" + id + ", name=" + name + ", sex=" + sex
				+ ", phone=" + phone + ", address=" + address + "]";
	}

	@Override
	public boolean equals(Object o) {
		if (this == o){
			return true;
		}
		if (o == null || getClass() != o.getClass()) {
			return false;
		}
		Student student = (Student) o;
		return Objects.equals(id, student.id) &&
				Objects.equals(name, student.name);
	}

	@Override
	public int hashCode() {
		return Objects.hash(id, name);
	}
	@Override
	public Object clone() throws CloneNotSupportedException {
		return super.clone();
	}
}
